package com.file;

import java.io.File;
import java.io.IOException;

/**
 * Created by z on 2016/11/16.
 */
public class FileDemo {

    public  static void main(String args[]) {
        try {
            File file = new File("text1");
            file.createNewFile();

            System.out.println("can execute " +file.canExecute());
            System.out.println("is exists " + file.exists());

            file.delete();

            System.out.println("delte after can execute " +file.canExecute());
            System.out.println("delte after is exists " + file.exists());


        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
